/*
 * @Author: yuandawei
 * @Date: 2020-11-16 09:47:42
 * @LastEditTime: 2020-11-21 09:33:50
 * @LastEditors: Please set LastEditors
 * @Description: 分销顾问请求api
 * @FilePath: \vue-admin-beautiful-pro-template\src\api\conunselor.js
 */
import request from '@/utils/request'

// 获取分销顾问列表
export function getCounselor(data) {
  return request({
    url: '/distributionConsul/employeeInfoPage.do',
    method: 'POST',
    data,
  })
}

//根据登录账号查询单个顾问信息
export function checkCounselorInfo(params) {
  return request({
    url: '/distributionConsul/employeeByUser.do',
    method: 'GET',
    params,
  })
}

// 增加分销顾问信息
export function addCounselor(data) {
  return request({
    url: '/distributionConsul/addDistribution.do',
    method: 'POST',
    data,
  })
}

// 查询分销顾问详情
export function getCounselorDetail(params) {
  return request({
    url: '/distributionConsul/employeeInfo.do',
    method: 'GET',
    params,
  })
}
// 查询招顾下级分销员列表
export function getCounselorDown(data) {
  return request({
    url: '/distributionConsul/getDistribution.do',
    method: 'POST',
    data,
  })
}

// 导出分销顾问
export function exportCounselor(params) {
  return request({
    url: '/distributionConsul/export.do',
    method: 'GET',
    params,
  })
}

// 分销顾问不含冻结
export function getUnfreezeCounselor() {
  return request({
    url: '/distributionConsul/distributionConsulList.do',
    method: 'GET',
  })
}

// 设置分销顾问备注编辑
export function remarkEdit(params) {
  return request({
    url: '/distributionConsul/setRemarks.do',
    method: 'GET',
    params,
  })
}

// 修改招生顾问信息
export function editCounselor(data) {
  return request({
    url: '/distributionConsul/updateDistribution.do',
    method: 'POST',
    data,
  })
}
